package com.example.hotel.service.impl;
import com.example.hotel.dao.RoomDao;
import com.example.hotel.entity.Room;
import com.example.hotel.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service


public class RoomServiceImpl implements RoomService {

    @Autowired
    private RoomDao roomDao;


    @Override
    public List<Room> findAllRoom() {
        return roomDao.findAllRoom();
    }

    @Override
    public int insert(Room room) {
        return roomDao.insert(room);
    }

    @Override
    public int deleteById(int roomId) {
        return roomDao.deleteById(roomId);
    }



    @Override
    public int update(int roomId,String roomType,String roomState,float price) {
        return roomDao.update(roomId, roomType, roomState, price);
    }

}
